extends Control

var desc:String = "技能描述"

func _ready():
	await get_tree().create_timer(4).timeout
	if ObjectManager.gameManager.me_player:
		var player = ObjectManager.gameManager.me_player as Player
		$"外框".self_modulate = player.color

func update(msg: String):
	$Label.text = msg

# 开启定时，1s后才会显示出来
func startTimer(msg:String):
	stopTimer()
	desc = msg
	$Timer.start(1)

# 鼠标不指向，取消定时
func stopTimer():
	visible = false
	$Timer.stop()

# 时间到了，进行显示
func _on_timer_timeout():
	visible = true
	$Label.text = desc
